public class Bishop implements Piece {

    private Color color;
    private int moveCount;

    public Bishop( Color color ) {
	this.color = color;
	moveCount = 0;
    }

    public boolean legalMove( int x1, int y1, int x2, int y2) {
	if( (x1 == x2) || (y1 == y2) ) {
	    return false;
	}
	if( Math.abs(x1-x2) == Math.abs(y1-y2) ) {
	    return true;
	}
	return false;
    }

    public Color color() {
	return color;
    }

    public String name() {
	return "Bishop";
    }

    public void movesPlusOne() {
	moveCount += 1;
    }

    public int moveCount() {
	return moveCount;
    }

}

